<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="apple-touch-fullscreen" content="yes">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta name="format-detection" content="telephone=no">

        <title>轩盛商品方案</title>

        <link href="__CSS__/index.css" rel="stylesheet">


        <link href="__CSS__/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
        <link href="__CSS__/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
        <link href="__CSS__/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
        <link href="__CSS__/animate.min.css" rel="stylesheet">
        <link href="__CSS__/style.min862f.css?v=4.1.0" rel="stylesheet">
        <link href="__JS__/layui/css/layui.css"rel="stylesheet">
        
        <style>
         .table {
                  table-layout:fixed;
                }

          table {border:2px solid #000!important;border-collapse: collapse!important}
          table td{border:2px solid #000!important}
          table th{border:2px solid #000!important}

        </style>

    </head>
    <body>

<div id="export_word">

        <div style="height: 30px;"></div>

        <div id="scheme_name" class="text-center printPage">
            <p style="font-size: 30px">轩盛后台</p>
        </div>

         <div style="height: 20px;"></div>

    <div class="container">

      <div id="Template">

        <div class="table-responsive">

          <table class="table table-hover table-bordered table-striped">
           <tr>
                  <thead id="finalhead">
                     <tr>
                          <th class="tablefinal">
                            <div>金融代码</div>
                          </th>
                          <th class="tablefinal">
                            <div>贷款方式</div>
                          </th>
                          <th class="tablefinal">
                            <div>放款时间</div>
                          </th>
                          <th class="tablefinal">
                            <div>贷款金额</div>
                          </th>
                          <th class="tablefinal">
                            <div>贷款期限</div>
                          </th>
                          <th class="tablefinal">
                            <div>综合月利息</div>
                          </th>
                          <th class="tablefinal">
                            <div>一次性平台费/保险费</div>
                          </th>
                          <th class="tablefinal">
                            <div>后期还贷利息</div>
                          </th>
                          <th class="tablefinal">
                            <div>还款方式</div>
                          </th>
                          <th class="tablefinal">
                            <div>每月还款</div>
                          </th>
                          <th class="tablefinal">
                            <div>征信次数</div>
                          </th>
                          <th class="tablefinal" style="width:200px;" >
                            <div>征信显示</div>
                          </th>
                          <th class="tablefinal printPage">
                            <div>操作</div>
                          </th>
                        </tr>
                  </thead>

             

                  <tbody id="finaltbody" class="finaltbody">
   <!--                  <tr>
                     <td class="text-center" id="Financialcode">正在加载</td>
                     <td class="text-center" id="Loanmethod">正在加载</td>
                     <td class="text-center" id="Lendingtime">正在加载</td>
                     <td class="text-center" id="Amountofloan">正在加载</td>
                     <td class="text-center" id="Loanterm">正在加载</td>
                     <td class="text-center" id="Comprehensive">正在加载</td>
                     <td class="text-center" id="Disposable">正在加载</td>
                     <td class="text-center" id="Later">正在加载</td>
                     <td class="text-center" id="Repaymentmethod">正在加载</td>
                     <td class="text-center" id="Monthlyrepayment">正在加载</td>
                     <td class="text-center" id="Bond">正在加载</td>
                     <td class="text-center" id="credit_investigation">正在加载</td>
                     <td class="text-center" id="credit">正在加载</td>
                     <td class="text-center printPage"><input type="button" style="width: 40px; height:34px; padding:0;" value="编辑">
                     <button class="btn btn-danger classifyRemove"  title="删除商品"><i class="fa fa-trash-o"></i></button>
                 </td>
                    </tr> -->

                  </tbody>
               
           </tr>
          </table>


        </div>
            

            <div class="cause">

                <textarea disabled="disabled"  name="loan_multiples_requirements" style="resize:none;height: 70px;text-align: center;font-size: 20px; " class="form-control" rows="8">等本等息还款公式：每月还款=贷款金额/贷款期限+贷款金额*后期还贷利息&#10综合月利息（即利息成本）=平台费月利息+后期还贷利息</textarea>
                
                    <div style="height: 5px;"></div>

                <textarea  name="loan_multiples_requirements"   style="resize:none;height: 70px; font-size: 15px; " class="form-control" rows="8">一切方案尽以征信、保单网核过关为准</textarea>

                <p style="float: right;">以上资料仅供参考,一切贷款金额以融资机构批款,放款为准,一切解释权归本公司所有</p>

                <div style="height: 20px;"></div>

            
    
              <label class="col-sm-3 control-label"><span style="color: #ff0000;">*</span>准备资料</label>

                <textarea  name="loan_multiples_requirements" style="resize:none" class="form-control" rows="8"></textarea>
                

            </div>

        <div style="height: 50px;"></div>
            

      </div>

    </div>

 </div>



<!--         <div class="form-group">

            <div class="col-sm-2 col-sm-offset-2">
                <button lay-submit lay-filter ="upload" onclick="Reselection()" style="width: 150px;" class="btn btn-primary btn-block printPage" >重新挑选</button>
            </div>

            <div class="col-sm-2 col-sm-offset-5">
                <button lay-submit lay-filter ="upload" onclick="final_Submission()"  style="width: 150px;" class="btn btn-primary btn-block printPage" >打印方案</button>
            </div>

            <div class="col-sm-2 col-sm-offset-2">
                <code class="language-html"><a href="javascript:void(0)" class="btn btn-primary printPage" onclick="exportWord()">导出</a></code> 
            </div>
        </div> -->
        
        
        <div style="height: 100px;"></div>
 
        <!-- <script src="__JS__/screeningjs/jquery-1.4.3.min.js"></script>  -->

         <script src="__JS__/jquery.min.js?v=2.1.4"></script>

        <script src="__JS__/FileSaver.js"></script>
        <script src="__JS__/jquery.wordexport.js"></script>

        <script src="__JS__/bootstrap.min.js?v=3.3.6"></script>
        <script src="__JS__/content.min.js?v=1.0.0"></script>

        <script src="__JS__/layui/layui.js"></script> 

      

        <script type="text/javascript">

             // 全局变量
             g_name="";

             var versions = "";


           // 引用layui
        layui.use(['layer', 'form'], function(){
          var layer = layui.layer;
          var form = layui.form;
        });

        var result = getUrlParms('order_sn');
        var concentration = getUrlParms('concentration');
        var versions = getUrlParms('versions');

            // 加载初始数据
           $(function(){

            $.ajax({

                type:"post",

                url:"prints",

                 data:'order_sn='+result+'&concentration='+concentration+'&versions='+versions,
                success:function(data){



                    console.log(data);

                    var switch1 = 1;

                    var html = "";

                    var html2 = "";

                    var html3 = "";

                    var htmla = "";

                    var synthesize = "";

                    var refund = "";
                    // 综合月利息
                    var a=0; 

                    var b=0;

                    var c=0;

                    // 每月还款

                    var d=0; 


                    // 取后三位

                    var synthe=0;

                    var refundnum=0;
                    // 后台传过来的是 对象字符串

                        // 将字符串 转成 Json对象

                    // var jsonObj = $.parseJSON(data);

                    // 遍历Json对象

                    $.each(data,function(i,v){

                    console.log(i);
                    console.log(v);

                    versions = v.versions;

                    if (i == 0) {

                if (v.type == 1) {

                    html+=`

                   <div class="text-center">
                        <p style="font-size: 30px">${v.scheme_name}</p>
                        <p style="font-size: 24px">第${v.versions}方案表</p>
                    </div>
                    
                    <div style="height: 30px;"></div>

                    <div class="table-responsive">

                      <table class="table table-hover table-bordered table-striped">
                       <tr>
                              <thead id="finalhead">
                                 <tr style="border:2px solid #000!important">
                                 
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>金融代码</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>贷款方式</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>放款时间</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>贷款金额</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>贷款期限</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>综合月利息</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>一次性平台费/保险费</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>后期还贷利息</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>还款方式</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>每月还款</div>
                                      </th>
                                      
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>保证金及手续费</div>
                                      </th>
                                      
                                    </tr>
                              </thead>

                         

                              <tbody id="finaltbody" class="finaltbody">
                                

                              </tbody>
                           
                       </tr>
                      </table>


                    </div>
                        
                        <div id="cause" >

                            <textarea disabled="disabled"  name="loan_multiples_requirements" style="resize:none;height: 70px;text-align: center;font-size: 20px; " class="form-control" rows="8">等本等息还款公式：每月还款=贷款金额/贷款期限+贷款金额*后期还贷利息&#10综合月利息（即利息成本）=平台费月利息+后期还贷利息</textarea>
                            
                                <div style="height: 5px;"></div>

                            <textarea  name="loan_multiples_requirements"   style=" border:2px solid #000!important;resize:none;height: 70px; font-size: 15px; font-weight: bold;" class="form-control ready" rows="8">${v.remark}</textarea>
                            
                            

                            <div style="height: 20px;">
                            <p style="float: right;">以上资料仅供参考,一切贷款金额以融资机构批款,放款为准,一切解释权归本公司所有</p>
                            </div>
                            
                            

                            <div style="height: 20px;">
                              <p style="float: right;">${v.date}</p>
                            </div>

                        
                
                          <label class="col-sm-3 control-label"><span style="color: #ff0000;">*</span>准备资料</label>
                            <div class="">
                            <textarea  name="loan_multiples_requirements" style="border:2px solid #000!important; font-weight: bold;" class="form-control cause " rows="8"></textarea>
                            </div>

                        </div>

                        <div style="height: 10px;"></div>
                        
                        <div class="form-group">

                         <div class="form-group">

                        <div class="col-sm-2 col-sm-offset-5">
                            <button lay-submit lay-filter ="upload" onclick="final_Submission()"  style="width: 150px;" class="btn btn-primary btn-block printPage" >打印方案</button>
                        </div>

                        <div class="col-sm-2 col-sm-offset-2">
                            <code class="language-html"><a href="javascript:void(0)" class="btn btn-primary printPage" onclick="exportWord()">导出</a></code> 
                        </div>
                        </div>

                    <div style="height: 50px;"></div>
                    


                     

                       

                    `
                }else if (v.type == 2) {

                html+=`

                   <div class="text-center">
                        <p style="font-size: 30px">${v.scheme_name}</p>
                        <p style="font-size: 24px">第${v.versions}方案表</p>
                    </div>
                    
                    <div style="height: 30px;"></div>

                
                    <div class="table-responsive">

                      <table class="table table-hover table-bordered table-striped">
                       <tr>
                              <thead id="finalhead">
                                 <tr style="border:2px solid #000!important">
                                 
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>金融代码</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>贷款方式</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>放款时间</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>贷款金额</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>贷款期限</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>综合月利息</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>一次性平台费/保险费</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>后期还贷利息</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>还款方式</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>每月还款</div>
                                      </th>
                                      
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>保证金及手续费</div>
                                      </th>
                                      
                                    </tr>
                              </thead>

                         

                              <tbody id="finaltbody" class="finaltbody">
                                

                              </tbody>
                           
                       </tr>
                      </table>


                    </div>
                        

                        <div id="cause" >

                            <textarea disabled="disabled"  name="loan_multiples_requirements" style="resize:none;height: 70px;text-align: center;font-size: 20px; " class="form-control" rows="8">等本等息还款公式：每月还款=贷款金额/贷款期限+贷款金额*后期还贷利息&#10综合月利息（即利息成本）=平台费月利息+后期还贷利息</textarea>
                            
                                <div style="height: 5px;"></div>

                            <textarea  name="loan_multiples_requirements"   style=" border:2px solid #000!important;resize:none;height: 70px; font-size: 15px; font-weight: bold;" class="form-control ready" rows="8">${v.remark}</textarea>

                            

                            <div style="height: 20px;">
                            <p style="float: right;">以上资料仅供参考,一切贷款金额以融资机构批款,放款为准,一切解释权归本公司所有</p>
                            </div>
                            
                            

                            <div style="height: 20px;">
                            <p style="float: right;">${v.date}</p>
                            </div>

                        
                
                          <label class="col-sm-3 control-label"><span style="color: #ff0000;">*</span>准备资料</label>
                            <div class="">
                            <textarea  name="loan_multiples_requirements" style="border:2px solid #000!important; font-weight: bold;" class="form-control cause" rows="8"></textarea>
                            </div>

                        </div>

                               <div style="height: 10px;"></div>
                        
                        <div class="form-group">

                         <div class="form-group">

                        <div class="col-sm-2 col-sm-offset-5">
                            <button lay-submit lay-filter ="upload" onclick="final_Submission()"  style="width: 150px;" class="btn btn-primary btn-block printPage" >打印方案</button>
                        </div>

                        <div class="col-sm-2 col-sm-offset-2">
                            <code class="language-html"><a href="javascript:void(0)" class="btn btn-primary printPage" onclick="exportWord()">导出</a></code> 
                        </div>
                        </div>
                        

                    <div style="height: 50px;"></div>
                    
                    

                       

                    `

                }else if (v.type == 3) {

                    html+=`

                     <div class="text-center">
                        <p style="font-size: 30px">${v.scheme_name}</p>
                        <p style="font-size: 24px">第${v.versions}方案表</p>
                    </div>
                    
                    <div style="height: 30px;"></div>

                    <div class="table-responsive">

                      <table class="table table-hover table-bordered table-striped">
                       <tr>
                              <thead id="finalhead">
                                 <tr style="border:2px solid #000!important">

                                 
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>金融代码</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>贷款方式</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>放款时间</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>贷款金额</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>贷款期限</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>综合月利息</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>一次性平台费/保险费</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>后期还贷利息</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>还款方式</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>每月还款</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>费用</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal" style="width:200px;" >
                                        <div>备注</div>
                                      </th>
                                      <th style="border:2px solid #000!important" class="tablefinal">
                                        <div>保证金及手续费</div>
                                      </th>
                                      
                                    </tr>
                              </thead>

                         

                              <tbody id="finaltbody" class="finaltbody">
                                

                              </tbody>
                           
                       </tr>
                      </table>


                    </div>
                        

                        <div id="cause" >

                            <textarea disabled="disabled"  name="loan_multiples_requirements" style="resize:none;height: 70px;text-align: center;font-size: 20px; " class="form-control" rows="8">等本等息还款公式：每月还款=贷款金额/贷款期限+贷款金额*后期还贷利息&#10综合月利息（即利息成本）=平台费月利息+后期还贷利息</textarea>
                            
                                <div style="height: 5px;"></div>

                            <textarea  name="loan_multiples_requirements"   style=" border:2px solid #000!important;resize:none;height: 70px; font-size: 15px; font-weight: bold;" class="form-control ready" rows="8">${v.remark}</textarea>

                            
                            
                            <div style="height: 20px;">
                            <p style="float: right;">以上资料仅供参考,一切贷款金额以融资机构批款,放款为准,一切解释权归本公司所有</p>
                            </div>

                            

                            <div style="height: 20px;">
                            <p style="float: right;">${v.date}</p>
                            </div>

                        
                
                          <label class="col-sm-3 control-label"><span style="color: #ff0000;">*</span>准备资料</label>
                            <div class="">
                            <textarea  name="loan_multiples_requirements" style="border:2px solid #000!important; font-weight: bold;" class="form-control cause " rows="8"></textarea>
                            </div>

                        </div>

                               <div style="height: 10px;"></div>
                        
                        <div class="form-group">

                         <div class="form-group">

                        <div class="col-sm-2 col-sm-offset-5">
                            <button lay-submit lay-filter ="upload" onclick="final_Submission()"  style="width: 150px;" class="btn btn-primary btn-block printPage" >打印方案</button>
                        </div>

                        <div class="col-sm-2 col-sm-offset-2">
                            <code class="language-html"><a href="javascript:void(0)" class="btn btn-primary printPage" onclick="exportWord()">导出</a></code> 
                        </div>
                        </div>
                        

                    <div style="height: 50px;"></div>
                    

    
    
                    `
                }else if (v.type == 4) {
                    
                    html+=`

                    <div class="text-center">
                        <p style="font-size: 30px">${v.scheme_name}</p>
                        <p style="font-size: 24px">第${v.versions}方案精简表</p>
                    </div>
                    
                    <div style="height: 30px;"></div>

                    <div class="table-responsive">

                          <table class="table table-hover table-bordered table-striped">
                           <tr>
                                  <thead id="Concentratefinalhead">
                                        <tr style="border:2px solid #000!important">
                                        <th style="border:2px solid #000!important" class="tablefinal printPage">
                                            <div>操作</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>金融代码</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>贷款方式</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>放款时间</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>贷款金额</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>贷款期限</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>综合月利息</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>一次性平台费/保险费</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>后期还贷利息</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>还款方式</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>每月还款</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>保证金及手续费</div>
                                          </th>
                                          
                                        </tr>
                                  </thead>

                             

                                  <tbody class="finaltbody">
                                    

                                  </tbody>
                               
                           </tr>
                          </table>


                        </div>
                            

                            <div id="cause" >

                                <textarea disabled="disabled"  name="loan_multiples_requirements" style="resize:none;height: 70px;text-align: center;font-size: 20px; " class="form-control" rows="8">等本等息还款公式：每月还款=贷款金额/贷款期限+贷款金额*后期还贷利息&#10综合月利息（即利息成本）=平台费月利息+后期还贷利息</textarea>
                                
                                    <div style="height: 5px;"></div>

                                <textarea  name="loan_multiples_requirements"   style=" border:2px solid #000!important;resize:none;height: 70px; font-size: 15px; font-weight: bold;" class="form-control" rows="8">${v.remark}</textarea>

                                
                                
                                <div style="height: 20px;">
                                <p style="float: right;">以上资料仅供参考,一切贷款金额以融资机构批款,放款为准,一切解释权归本公司所有</p>
                                </div>
                            
                                 

                                <div style="height: 20px;">
                                  <p style="float: right;">${v.date}</p>
                                </div>

                            
                    
                              <label class="col-sm-3 control-label"><span style="color: #ff0000;">*</span>准备资料</label>
                            <div class="">
                                 <textarea  name="loan_multiples_requirements" style="border:2px solid #000!important; font-weight: bold;" class="form-control cause " rows="8"></textarea>
                                </div>

                            </div>

                            <div style="height: 10px;"></div>
                        
                        <div class="form-group">

                        <div class="col-sm-2 col-sm-offset-5">
                                <button lay-submit lay-filter ="upload" onclick="final_Submission(this)" data-concentration="${v.concentration}" data-versions="${v.versions}" style="width: 150px;" class="btn btn-primary btn-block printPage" >打印与导出</button>
                            </div>

                            
                        </div>

                        <div style="height: 50px;"></div>


    
    
                    `
                }else if (v.type == 5) {

                    html+=`

                  <div class="text-center">
                        <p style="font-size: 30px">${v.scheme_name}</p>
                        <p style="font-size: 24px">第${v.versions}方案精简表</p>
                    </div>
                    
                    <div style="height: 30px;"></div>

                 <div class="table-responsive">

                          <table class="table table-hover table-bordered table-striped">
                           <tr>
                                  <thead id="Concentratefinalhead">
                                        <tr style="border:2px solid #000!important">
                                        <th style="border:2px solid #000!important" class="tablefinal printPage">
                                            <div>操作</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>金融代码</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>贷款方式</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>放款时间</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>贷款金额</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>贷款期限</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>综合月利息</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>一次性平台费/保险费</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>后期还贷利息</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>还款方式</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>每月还款</div>
                                          </th>
                                          <th style="border:2px solid #000!important" class="tablefinal">
                                            <div>保证金及手续费</div>
                                          </th>
                                          
                                        </tr>
                                  </thead>

                             

                                  <tbody class="finaltbody">
                                    

                                  </tbody>
                               
                           </tr>
                          </table>


                        </div>
                            

                            <div id="cause" >

                                <textarea disabled="disabled"  name="loan_multiples_requirements" style="resize:none;height: 70px;text-align: center;font-size: 20px; " class="form-control" rows="8">等本等息还款公式：每月还款=贷款金额/贷款期限+贷款金额*后期还贷利息&#10综合月利息（即利息成本）=平台费月利息+后期还贷利息</textarea>
                                
                                    <div style="height: 5px;"></div>

                                <textarea  name="loan_multiples_requirements"   style=" border:2px solid #000!important;resize:none;height: 70px; font-size: 15px; font-weight: bold;" class="form-control" rows="8">${v.remark}</textarea>

                                <p style="float: right;">以上资料仅供参考,一切贷款金额以融资机构批款,放款为准,一切解释权归本公司所有</p>

                                <div style="height: 20px;"></div>

                            
                    
                              <label class="col-sm-3 control-label"><span style="color: #ff0000;">*</span>准备资料</label>
                            <div class="" >
                                <textarea  name="loan_multiples_requirements" style="border:2px solid #000!important; font-weight: bold;" class="form-control cause " rows="8"></textarea>
                                </div>

                            </div>

                            <div style="height: 10px;"></div>
                        
                        <div class="form-group">

                        <div class="col-sm-2 col-sm-offset-5">
                                <button lay-submit lay-filter ="upload" onclick="final_Submission(this)" data-concentration="${v.concentration}" data-versions="${v.versions}" style="width: 150px;" class="btn btn-primary btn-block printPage" >打印与导出</button>
                            </div>

                            
                        </div>

                        <div style="height: 50px;"></div>



    
    
                    `
                }

          }


                    })

                    $('#Template').html(html);
                    html="";

                        $.ajax({

                            type:"post",

                            url:"prints",

                            data:'order_sn='+result+'&concentration='+concentration+'&versions='+versions,

                            success:function(data){

                            console.log(data);   

                            var html="";

                            var html1="";

                            var daiding = 0;

                            $.each(data,function(i,v){

                                // console.log(v);



                                // console.log(i);

                                if (v.type == 1 ||v.type == 2) {

                                html+=`
                              
                                 <tr id="html${i}" style="border:2px solid #000!important">
                                     <td style="border:2px solid #000!important" class="text-center" id="Financialcode">${v.name}</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Loanmethod">${v.patterns_lending}</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Lendingtime">${v.time}</td>
                                     <td style="border:2px solid #000!important" class="text-center ss" id="Amountofloan">${v.loan_money}万</td>
                                     <td style="border:2px solid #000!important" class="text-center ss"  id="Loanterm">${v.deadline}年</td>
                                     <td style="border:2px solid #000!important" class="text-center"  id="Comprehensive">${v.Comprehensive}%</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Disposable">${v.platform_fee}%</td>
                                     <td style="border:2px solid #000!important" class="text-center " id="Later">${v.interest}%</td>
                                     <td style="border:2px solid #000!important" class="text-center " id="Repaymentmethod">${v.mode_repayment}</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Monthlyrepayment">${v.refund}元/月/${v.deadline}年</td>
                                     <td class="text-center ss " style="display:none" id="vid">${v.id}</td>
                                     

                                     
                                </tr>
                                   
                                `
                                }else if (v.type == 3) {

                                html+=`
                              
                            
                                 <tr id="html${i}" style="border:2px solid #000!important">
                                     <td style="border:2px solid #000!important" class="text-center ss" id="Financialcode">${v.name}</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Loanmethod">${v.patterns_lending}</td>
                                     <td style="border:2px solid #000!important" class="text-center ss" id="Lendingtime">${v.time}</td>
                                     <td style="border:2px solid #000!important" class="text-center ss" id="Amountofloan">${v.loan_money}万</td>
                                     <td style="border:2px solid #000!important" class="text-center ss"  id="Loanterm">${v.deadline}年</td>
                                     <td style="border:2px solid #000!important" class="text-center ss"  id="Comprehensive">${v.Comprehensive}%</td>
                                     <td style="border:2px solid #000!important" class="text-center ss" id="Disposable">${v.platform_fee}%</td>
                                     <td style="border:2px solid #000!important" class="text-center ss" id="Later">${v.interest}%</td>
                                     <td style="border:2px solid #000!important" class="text-center ss" id="Repaymentmethod">${v.mode_repayment}</td>
                                     <td style="border:2px solid #000!important" class="text-center ss" id="Monthlyrepayment">${v.refund}元/月/${v.deadline}年</td>
                                     <td class="text-center ss " style="display:none" id="vid">${v.id}</td>
                                     <td style="border:2px solid #000!important" class="text-center ss" id="cost">${v.cost}</td>
                                     <td style="border:2px solid #000!important" class="text-center ss" id="remarks">${v.remarks}</td>

                                     
                                </tr>
                                   
                                `


                                }else if (v.type == 4) {

                                html+=`
                              
                            
                                 <tr style="border:2px solid #000!important" id="html${i}">
                                     <td style="border:2px solid #000!important" class="text-center printPage">
                                    <button class="btn btn-info classifyRemove" data-versions="${v.versions}" onClick="detailData(this)" title="生成"><i class="fa fa-eye"></i></button>
                                     </td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Financialcode">${v.name}</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Loanmethod">${v.patterns_lending}</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Lendingtime">${v.time}</td>
                                     <td style="border:2px solid #000!important" class="text-center " id="Amountofloan">${v.loan_money}万</td>
                                     <td style="border:2px solid #000!important" class="text-center "  id="Loanterm">${v.deadline}年</td>
                                     <td style="border:2px solid #000!important" class="text-center"  id="Comprehensive">${v.Comprehensive}%</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Disposable">${v.platform_fee}%</td>
                                     <td style="border:2px solid #000!important" class="text-center " id="Later">${v.interest}%</td>
                                     <td style="border:2px solid #000!important" class="text-center " id="Repaymentmethod">${v.mode_repayment}</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Monthlyrepayment">${v.refund}元/月/${v.deadline}年</td>
                                     <td class="text-center ss " style="display:none" id="vid">${v.id}</td>
                                     
                                     
                                </tr>
                                   
                                `


                                }else if (v.type == 5) {

                                html+=`
                              
                            
                                 <tr style="border:2px solid #000!important" id="html${i}">
                                    <td style="border:2px solid #000!important" class="text-center printPage">
                                    <button class="btn btn-info classifyRemove" data-versions="${v.versions}" onClick="detailData(this)" title="生成"><i class="fa fa-eye"></i></button>
                                     </td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Financialcode">${v.name}</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Loanmethod">${v.patterns_lending}</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Lendingtime">${v.time}</td>
                                     <td style="border:2px solid #000!important" class="text-center " id="Amountofloan">${v.loan_money}万</td>
                                     <td style="border:2px solid #000!important" class="text-center "  id="Loanterm">${v.deadline}年</td>
                                     <td style="border:2px solid #000!important" class="text-center"  id="Comprehensive">${v.Comprehensive}%</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Disposable">${v.platform_fee}%</td>
                                     <td style="border:2px solid #000!important" class="text-center " id="Later">${v.interest}%</td>
                                     <td style="border:2px solid #000!important" class="text-center " id="Repaymentmethod">${v.mode_repayment}</td>
                                     <td style="border:2px solid #000!important" class="text-center" id="Monthlyrepayment">${v.refund}元/月/${v.deadline}年</td>
                                     <td class="text-center ss " style="display:none" id="vid">${v.id}</td>
                                     
                                     
                                </tr>
                                   
                                `


                                }

                                // 准备资料
                                 html1+=`${v.datum}\r\n`


                                
                                $('.finaltbody').append(html);
                                
                                $('.cause').append(html1);
                                
                            
                                html="";
                                html1="";
                              
                                // 添加最后一格待定
                             if (daiding == 0) {

                                html2+=`<td class="text-center" rowspan="${data.length}" id="vid">待定</td>`
                                
                                daiding++;
                                
                              $('#html'+i).append(html2);
                              }

                              html2="";

                            

                            })
                             
                            },
                            async:true
                        });
                    



                },

                async:true



            });
          

            })


        //获取地址栏参数，name:参数名称
        function getUrlParms(name){
            var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if(r!=null)
            return unescape(r[2]);
            return null;
        }

        var result = getUrlParms('order_sn');
        var concentration = getUrlParms('concentration');
        var versions = getUrlParms('versions');
        console.log(concentration);



                // 导出word
            function exportWord(){

                $(".printPage").css("display","none");
                $("html").wordExport(g_name);
                $(".printPage").css("display","");
          
                return false;
                }



             function final_Submission(){

               // 打印
              $(".printPage").css("display","none");
              
              window.print(); 
              $(".printPage").css("display","");
              
              return false;
            }


        </script>
    </body>
</html>
